#ifndef __kraw__AssetLoader_h__
#define __kraw__AssetLoader_h__

#include <string>

namespace kraw
{
	class Resource;
	class AssetLoader
	{
	public:
		AssetLoader();
		virtual ~AssetLoader();

		virtual bool load() = 0;
		virtual void unload() = 0;

		virtual std::string getAssetName();

		bool loaded() { return isLoaded; }

	protected:
		friend class ResourceManager;

		bool loadBuffer();
		void unloadBuffer();
		unsigned char* buffer;
		int bufferSize;

		std::string assetName;
		Resource* resource;
		bool isLoaded;
	};
}

#endif
